package com.fiidee.blog.service;

import com.fiidee.blog.dto.BlogDTO;
import com.fiidee.blog.entity.Blog;
import com.fiidee.blog.entity.BlogData;
import org.apache.http.HttpResponse;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * Created by 瑱彬 on 2015/5/27.
 */
public interface BlogService extends BaseService<Blog,BlogDTO> {
    int doPublish(Blog blog,BlogData blogData,HttpServletResponse response);

    int doSave(Blog blog,BlogData blogData,HttpServletResponse response);

    List<Map<String,Object>> getHomeList(int page);

    List<Map<String,Object>> getSelfList(int page,int uid);

    List<Map<String,Object>> getCategoryList(int page,int catId);

    List<Map<String,Object>> getUserList(int page, int uid);

    List<Map<String,Object>> getRecommendList();

    Map<String,Object> getArroundBlog(Integer id);

    int countHomeList();

    int countCategoryList(int catId);

    int countUserList(int uid);

    Map<String,Object> getBlogContent(int id);

    int topBlog(int userid,int blogid);

    int cancelTopBlog(int userid,int blogid);


    int trashBlog(int userid,int blogid);

    int recoveryBlog(int userid,int blogid);

    int collectionBlog(int userid,int blogid);

    int cancelCollecttion(int userid, int blogid);

}
